{# Base template that should be used for all screens. Shows the Header + back button #}

{% extends 'templates/root.xml.njk' %}

{% block root %}
  <doc xmlns="https://hyperview.org/hyperview" {% block custom_ns %}{% endblock %}>
    <screen>
      <styles>
        {% include 'templates/styles.xml.njk' %}
        {% block styles %}
        {% endblock %}
      </styles>
      <body style="body">
        {% block body %}
          {% include 'templates/header.xml.njk' %}
          {% block container %}{% endblock %}
        {% endblock %}
      </body>
    </screen>
    {% block custom_screen %}
    {% endblock %}
    <screen id="loading-screen">
      <styles>
        {% include 'templates/styles.xml.njk' %}
      </styles>
      <body style="body">
        <view style="loading">
          <text style="loading-text">Loading…</text>
          <spinner/>
        </view>
      </body>
    </screen>
    <screen id="loading-screen-pushed">
      <styles>
        {% include 'templates/styles.xml.njk' %}
      </styles>
      <body style="body">
        {% set hv_title = "" %}
        {% set hv_button_behavior = "back" %}
        {% include 'templates/header.xml.njk' %}
        <view style="loading">
          <text style="loading-text">Loading…</text>
          <spinner/>
        </view>
      </body>
    </screen>
    <screen id="loading-screen-modal">
      <styles>
        {% include 'templates/styles.xml.njk' %}
      </styles>
      <body style="body">
        {% set hv_title = "" %}
        {% set hv_button_behavior = "close" %}
        {% include 'templates/header.xml.njk' %}
        <view style="loading">
          <text style="loading-text">Loading…</text>
          <spinner/>
        </view>
      </body>
    </screen>
  </doc>
{% endblock %}
